﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MMSWebsite.DataAccessManagement;

namespace MMSWebsite.Models
{
    public class EmployeeViewModel
    {
        public Employee Employee { get; set; }
        public List<RoleWrapper> Roles { get; set; }

        public EmployeeViewModel()
        {
            RoleAccessProvider roles = new RoleAccessProvider();
            var listrole = roles.GetAllRoles();
            this.Roles = new List<RoleWrapper>();
            foreach (var mmsRole in listrole)
            {
                this.Roles.Add(new RoleWrapper
                                   {
                                       Role = mmsRole,
                                       RoleIsChecked = false
                                   });
            }
        }
    }
}